package Array;

import java.sql.Array;
import java.util.Arrays;

public class MaoPao1 {
    public static void main(String[] args) {
        int [] arr={1,4,2,100,42,88};
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < arr.length-1-i; j++) {
                if(arr[j]>arr[j+1]){
                   int t=arr[j+1];
                    arr[j+1]=arr[j];
                    arr[j]=t;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
